-
Notifications
You must be signed in to change notification settings - Fork 548
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mimir query engine: add support for min_over_time
, max_over_time
, sum_over_time
and avg_over_time
#8934
Conversation
0eaf8d9
to
33fef8f
Compare
…time` and `present_over_time`
…native histograms
1794e9e
to
dc3b6a9
Compare
min_over_time
and max_over_time
min_over_time
, max_over_time
, sum_over_time
and avg_over_time
Putting this back to draft to incorporate changes from prometheus/prometheus#14413 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know it's a draft. Just getting a head start :-)
@@ -1405,6 +1405,46 @@ func TestAnnotations(t *testing.T) { | |||
}, | |||
}, | |||
|
|||
"sum_over_time() over series with both floats and histograms": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(nit)
It might be worth splitting out the _over_time
functions into their own test so we can check the common case of mixed metrics etc iterating over the function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm inclined to leave this as-is for the time being - until prometheus/prometheus#14609 is vendored into Mimir, we need to skip one of the rate
test cases that would fall into this group of tests, and I don't think it's so bad that the tests are repeated.
# Conflicts: # pkg/streamingpromql/testdata/upstream/functions.test
What this PR does
This PR adds support for the following functions to MQE:
min_over_time
max_over_time
sum_over_time
avg_over_time
tl;dr of benchmark results:
sum_over_time
andavg_over_time
are up to 30% faster for floats and up to 50% faster for native histograms compared to Prometheus' engine. Peak memory consumption is largely the same, which is unsurprising given the final result dominates memory consumption in the benchmark cases.Benchmark results for
sum_over_time
andavg_over_time
, compared to Prometheus' engineWhich issue(s) this PR fixes or relates to
(none)
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]
.about-versioning.md
updated with experimental features.